<template>
    <div>
        <h3>我是ComB</h3>
        {{ $attrs.data2 }}
        <hr>
        <div>
            通过provider传递的响应式的数据data3 --- {{ data3 }}
        </div>
    </div>
</template>

<script setup lang='ts'>
import { inject, useAttrs } from 'vue';

const attrs = useAttrs()
const data3 = inject('data3')
</script>

<style scoped lang='scss'></style>